/**
 * @author David Young
 */
package csab.game;


import org.newdawn.slick.Input;

import csab.core.BehaviorController;
import csab.core.Sprite;

/**
 * This BehaviorController is simply a stub and does
 * not affect Sprite behavior at all. It is used for
 * Sprites which are affected by external and linear 
 * game logic or for Sprites whose purpose is to perform
 * an autonomous, repetitive task (i.e. an example would 
 * be the case of the BotSprite).
 * @author David Young
 * @see csab.core.Sprite
 * @see csab.game.sprites.BotSprite
 */
public class DumbController implements BehaviorController {
	private Sprite owned;
	public DumbController(Sprite owned)
	{
		this.owned = owned;
	}
	/* (non-Javadoc)
	 * @see csab.core.BehaviorController#doBehavior(int, java.util.List, org.newdawn.slick.Input)
	 */
	@Override
	public void doBehavior(int delta, Sprite target, Input i) {
		if(owned.isDead())
			owned.stopMoving();
	}

	/* (non-Javadoc)
	 * @see csab.core.BehaviorController#getOwnedSprite()
	 */
	@Override
	public Sprite getOwnedSprite() {
		return owned;
	}

}
